package com.shengde.jinwawaforleader.network;

import android.content.Context;

import com.shengde.jinwawaforleader.bean.User;
import com.shengde.jinwawaforleader.utils.ActivityHelper;
import com.shengde.jinwawaforleader.views.WaitingDialog;

import org.xutils.http.RequestParams;


public class BasexUtilsProtocol {
	private static final String TAG = "BasexUtilsProtocol";
	public static  WaitingDialog dialog;



	/**
	 * @param path
	 * @return
	 */
	public static  RequestParams sendHttpRequest(Context context,String path) {
		String url = "";
		if (User.isTest) {
			url = BaseProtocol.HOST_BASE_TEST + path;
		} else {
			url = BaseProtocol.HOST_BASE + path;
		}
		dialog = ActivityHelper.createLoadingDialog(context);
		dialog.show();
		RequestParams params = BaseProtocol.getRequestParams(url);
		return params;
	}

	public static  RequestParams sendGetHttpRequest(Context context,String path) {

		dialog = ActivityHelper.createLoadingDialog(context);
		dialog.show();
		RequestParams params = BaseProtocol.getRequestParams(path);
		return params;
	}

}